home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 9 / Night Owl CD-ROM (NOPV9) (Night Owl Publisher) (1993).ISO / 015a / csort3.zip / CUSORT.DOC next >
Text File  |  1993-06-08  |  9KB  |  223 lines

  1. |    Colorado Utilities Sort (CUSORT v.3)
  2. |
  3. |    by
  4. |
  5. |    Fred C. Hill
  6. |
  7. |    Micro System Solutions
  8. |    5048 W. Maplewood Ave.
  9. |    Littleton, CO 80123
  10. |    1-(303) 795-7653
  11. |    1-(800) 421-1789 (orders)
  12. |
  13. Sorting is one of those things every computer user must do at one time or 
  14. another, and the sort program provided with most versions of DOS just 
  15. doesn't do the job. It's slow; only sorts from column one; won't sort 
  16. descending; has a limited capacity; and only uses regular memory to sort in. 
  17. Not a very useful program when you have hundreds of thousands of records you 
  18. want sorted in position 25 for 12 characters.
  19.  
  20. CUSort implements what is known as a virtual sort, allowing you to sort more 
  21. than will fit in RAM at one time.  It does this by sorting manageable 
  22. portions of the input file first, and then merging these pre-sorted lists to 
  23. form the final output file.  In theory, two billion records can be sorted in 
  24. one run. In actual practice, the number of records will be limited only by 
  25. the amount of available disk or expanded memory (EMS) capacity, and, of 
  26. course, the amount of time you're willing to wait. 
  27.  
  28. CuSort Revision history
  29.  
  30. version 3.0 - June 1993
  31.   o  Added an option (F) to sort fixed length records. These records 
  32.      typically have no CR/LF separator and are written by BASIC, COBOL
  33.      etc.
  34.   o  Changed the file parameter from piped in/out to regular file I/O to
  35.      support fixed length records.
  36.  
  37. version 2.3 - April 1993
  38.   o  Fixed the comparison routine to give proper results when two records
  39.      of different lengths are processed. Prior to v2.3 the compare terminated 
  40.      at the length of the longer record.  All record lengths are now padded 
  41.      to the length of the larger prior to testing equality. Thanks to
  42.      Ray Schildknecht for the bug report.
  43.   
  44.   o  Added the capability to sort individual fields in decending mode. See
  45.      use documentation for details.
  46.  
  47. version 2.2 - November 1992
  48.   o  Fixed a bug in the parameter parsing which would not set the descending 
  49.      sort option properly.
  50.      Changed the version number to x.x vs x.xx
  51.  
  52. version 2.16 - February 1992
  53.   o  Added the quiet mode operation (/Q) at the request of Dave Holley of 
  54.      MicroMax Computer Services Corp.
  55.  
  56. version 2.1 - November 1990
  57.   o  Option E added.  Do not use Expanded memory even if available.
  58.  
  59.   o  At an abnormal termination CuSort now removes its work files.
  60.  
  61.   o  Bugs fixed - 
  62.   o   Option L flag was never initialized so it could be invoked at any 
  63.       time by leftover memory contents.
  64.  
  65.   o   StdIn was not always used properly.
  66.  
  67.   o   The D (remove duplicates) & L (sort by length) options were added at 
  68.       the request of Terry Hall of Illinois.  This addition allowed me to 
  69.       find the /B option bug also.
  70.  
  71. version 2.0 - August 1990
  72.   o   Option D Directory changed to Option R Redirect.
  73.  
  74.   o   Option D Added to indicate "No duplicates to be written."
  75.  
  76.   o   Option L added to indicate "Sort by record length."
  77.  
  78.   o   Bug fixed - if blank record option (/B) not selected the program would 
  79.       not produce an output file.
  80.  
  81. CUSort's operation is determined by the command line parameters you
  82. give it when the program is started.  The command line format is
  83.  
  84.      CuSort [options] <inputFile >outputFile
  85.  
  86.      Options:
  87.  
  88.          /-   Sort all fields in descending order. The default is
  89.               ascending order. See the /S command to sort an
  90.               individual field in descending order. When sorting by 
  91.               fields (/S command) this parameter will result in the 
  92.               entire file being sequenced in descending order from 
  93.               the major sort field to the minor sort field.
  94.  
  95.          /B   Do not write blank records. All blank records
  96.               found during the input phase will be discarded.
  97.  
  98.          /C xxx Set maximum record size to xxx. This will allow CUSORT 
  99.               to allocate a fixed record size and make the sort more 
  100.               effecient. Only use this option if you know absolutly 
  101.               what the maximum record size is.
  102.  
  103.          /D   Do not write duplicate records.
  104.  
  105.          /E   Do not use Expanded Memory (EMS) even if that memory
  106.               is available.
  107.  
  108.          /F xxx Set the size of a fixed length record. Some languages 
  109.               do not write a CR/LF for some file types. In BASIC, for 
  110.               example, a file opened for Random processing does not
  111.               get CR/LF's. By using the F option you can sort these files
  112.               as you would a normal text file.
  113.  
  114.          /L   Sort by length of record. /S parm is ignored.
  115.  
  116.          /I   Ignore upper/lower case.  All input is compared
  117.               as if it were upper case.
  118.  
  119.          /Q   Run in quiet mode.  No output is made to the StdErr
  120.               file. (StdErr is normally defined to the screen)
  121.  
  122.          /R xx     Redirect temporary sort files to directory
  123.                    xx. (files will be deleted before program
  124.                    terminates.)
  125.  
  126.          /S c,l[-]    
  127.               Sort fields ... c = column; l = length. You may
  128.               have a maximum of 6 /S fields during any single
  129.               run. They must be placed in priority sort order. 
  130.               Placing a minus sign '-' anywhere in the parameter 
  131.               will cause that field to be sorted in descending 
  132.               order.
  133.  
  134.          /T   Trim records. This parameter allows you to
  135.               remove blanks at the beginning and end of the
  136.               input records. Sequencing is done prior to
  137.               trimming.
  138.  
  139. Caution:  When using the descending options, the option can only be 
  140.           set once for each field.  If you use the global [/-] option
  141.           and then set a sort field in descending or [/S c,l-] the 
  142.           sequence will still be descending. In other words, using both
  143.           options will not reverse the ordering.
  144.  
  145.      Examples:
  146.  
  147.      CuSort /B /S 1,25  textin.dat  textout.dat
  148.           This example sorts just like the DOS sort except that the
  149.           sort field size is limited to 25 characters and any blank
  150.           records found during sorting will not be included in the
  151.           output file.
  152.  
  153.      CuSort /- /I  textin.dat  textout.dat
  154.           This example sorts the entire file, including blank
  155.           records in descending sequence. Lower case and Upper case
  156.           are sorted together.
  157.  
  158.      CuSort /I /S 10,5- /S 2,6  textin.dat  textout.dat
  159.           This example sorts on column 10 for 5 characters as the
  160.           major sort field (descending order) and column 2 for 6 
  161.           characters as the minor sort field (ascending order). 
  162.           Upper and lower case characters are sorted together.
  163.  
  164.      CuSort /- /I /S 10,5 /S 2,6  textin.dat  
  165.           This example sorts on column 10 for 5 characters as the
  166.           major sort field (descending order) and column 2 for 6 
  167.           characters as the minor sort field (ascending order). The 
  168.           entire file is sorted in descending sequence and upper and 
  169.           lower case characters are sorted together. Since no output 
  170.           file name was included it will be named "TEXTIN.SRT".
  171.  
  172.      CuSort /L /D /Q <textin >textout
  173.           This example will sort records by length of record and
  174.           will remove any duplicate records. Operate in quiet mode
  175.     ORDER FORM
  176.  
  177.      Name: ------------------------------------------------------
  178.  
  179.      Address: ---------------------------------------------------
  180.  
  181.      City: ---------------------------- State: ---- Zip: --------
  182.  
  183.      Phone: (     ) -------------------------------
  184.  
  185.      Credit card:   type -  Visa     Mastercard
  186.  
  187.      Card number: ------------------------------ expires ---/---
  188.      
  189.      Name on card: ---------------------------------------------
  190.  
  191. ----------------------------------------------------------------
  192.      CuSort latest version . . . . . . . . . . . . . . . $ 24.00
  193.           Includes the following..
  194.                Current disk direct from author
  195.                Telephone support
  196.                Notification of further upgrades and
  197.                     products.
  198.  
  199.      Colorado residents include 3% state tax and 
  200.           appropriate local tax. . . . . . . . . . . . . .$ -----
  201.  
  202.                          Shipping & Handling . . . . . . .$  5.00
  203.  
  204.                          Total included  . . . . . . . . .$ -----
  205.  
  206.  
  207. ----------------------------------------------------------------
  208. Order in one of three ways... Fill out this form and mail to: 
  209.      Micro System Solutions
  210.      5417 S. Cimarron Rd.
  211.      Littleton, CO 80123
  212. - or -
  213.      Call 1-(800) 421-1789 or 1-(300) 795-7653 (credit card orders)
  214. - or-
  215.      Leave a Compuserve CMail (Compuserve Mail) message for
  216.      Micro System Solutions (Fred C. Hill PPN 76060,102) with all
  217.      of the information above. (credit card orders or information
  218.      only please, DO NOT leave messages with credit card numbers
  219.      in the forum areas)
  220. ----------------------------------------------------------------
  221.  
  222.      
  223.